From 83cd67d589caf8d5111d575e5a4bc93763664fb1 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 2 Jun 2011 17:36:02 +0100 Subject: [PATCH] xl: print sxp on dry-run of create. The help text for xm create's --dry-run says "Dry run - prints the resulting configuration in SXP but does not create the domain." so update xl implementation to match. At least the xendomains initscript relies on this (for better or worse). Signed-off-by: Ian Campbell Tested-by: Carsten Schiers Acked-by: Ian Jackson Committed-by: Ian Jackson --- tools/libxl/xl_cmdimpl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index ddd3c64e6d..ca0841d5e0 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -1516,10 +1516,6 @@ static int create_domain(struct domain_create *dom_info) parse_config_data(config_file, config_data, config_len, &d_config, &d_config.dm_info); - ret = 0; - if (dom_info->dryrun) - goto out; - if (migrate_fd >= 0) { if (d_config.c_info.name) { /* when we receive a domain we get its name from the config @@ -1538,9 +1534,13 @@ static int create_domain(struct domain_create *dom_info) } } - if (debug) + if (debug || dom_info->dryrun) printf_info(-1, &d_config, &d_config.dm_info); + ret = 0; + if (dom_info->dryrun) + goto out; + start: domid = -1; -- 2.30.2